{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Disable the Public Kubeflow UI\n",
    "\n",
    "You must run this in your SageMaker notebook - not here in this notebook!\n",
    "\n",
    "This removes `istio-ingress` from the `istio-system` namespace and removes the publicly-available `LoadBalancer` endpoint.\n",
    "\n",
    "WE ARE REMOVING THE PUBLICLY AVAILABLE LOADBALANCER FOR THE KUBEFLOW DASHBOARD UI BECAUSE WE DON'T WANT TO GET HACKED."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%%bash\n",
    "\n",
    "source ~/.bash_profile\n",
    "\n",
    "cd ${KF_DIR}/.cache/manifests/manifests-1.0.2/ \n",
    "kubectl delete -k aws/istio-ingress/base --namespace istio-system\n",
    "cd ${KF_DIR}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# _If you see an error ^^ above ^^, then you are running this in the wrong notebook server.  Run this in your SageMaker Notebook.  Not here!!_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%%javascript\n",
    "Jupyter.notebook.save_checkpoint()\n",
    "Jupyter.notebook.session.delete();"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "conda_python3",
   "language": "python",
   "name": "conda_python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
